<template lang="html">
  <section class="components-property-header">
    <div class="userPhoto">
      <progressive-img :src="userInfo.headimgurl"/>
    </div>
    <div class="user">
      <h1>{{userInfo.nickname}}</h1>
      <!-- <p>我的积分:<span class="userPoint">392</span></p> -->
      <!-- <p>我的财富:<span>185.00 元</span></p> -->
    </div>
    <div class="userSelect">
      <button @click="$router.push({ path: '/property/coupon' })">兑换</button>
      <!-- <button @click="$router.push({ path: '/charge' })">充值</button> -->
    </div>
  </section>
</template>

<script>
export default {
  name: 'PropertyHeader',
  computed: {
    userInfo(){
      return this.$store.state.user.userInfo
    }
  },
}
</script>

<style lang="scss" scoped>
@import "../../css/config";
.components-property-header{
  position: relative;
  width: 100%;
  height: $property-header-height;
  box-sizing: border-box;
  padding: 41px 40px 33px 40px;
  display: flex;
  flex-direction: row;
  background-color:#f1f1f6 ;
  .userPhoto{
    width: 152px;
    height: 152px;
    line-height: 152px;
    border-radius: 100%;
    transform: rotate(0);
    overflow: hidden;
    img{
      display: inline-block;
      vertical-align: middle;
      width: 100%;
    }
  }
  .user{
    display: flex;
    height: 100%;
    box-sizing: border-box;
    flex-direction: column;
    justify-content: center;
    // justify-content: space-between;
    padding: 11px 35px;
    box-sizing: border-box;
    h1{
      font-size: 36px ;
      font-weight: bolder;
    }
    p{
      font-size: 24px;
    }
    span{
      padding-left: 15px;
    }
    .userPoint{
      font-size: 30px;
      font-weight: bolder;
    }
  }
  .userSelect{
    position: absolute;
    right: 40px;
    width: 144px;
    height: 152px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    button{
      margin-top: 15px;
      height: 40px;
      width: 144px;
      background-color:#ff4908;
      border-radius: 40px;
      font-size: 24px;
      color: #ffffff;
      font-weight: 100;
      &:active{
        color: $active-font;
        background-color: $active-bg;
      }
    }
    button:nth-child(1){
      margin-bottom: 10px;
    }
  }
}
</style>
